﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using COM.OA.BLL;
using System.Collections.Generic;
using COM.OA.Entity;

public partial class rc_rc_selectlike : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //取传递的参数
        string cmd = this.Request.QueryString["cmd"];

        string sql = "to_title like '%{0}%' and to_state=0";
        sql = string.Format(sql, cmd);
        IList<timeorder> tlist = timeorderBLL.Select(sql,true,false);
        this.Response.Write("<br/><br/>");
        this.Response.Write("<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr><td width='5' height='21'><img src='../images/sj/leftlin1.gif' width='6' height='21'></td><td width='936' bgcolor='#5AAE18'><div align='center'><div align='center' class='style42'><span class='style3 style2 style1 style16 style41'><span class='style3 style1 style16 style41'><strong>计 划 内 容</strong></span></div><span class='style1'></span></div></td><td width='6' height='21'><img src='../images/sj/rightlin1.gif' width='6' height='21'></td></tr></table>");
        this.Response.Write("<table width='100%' border='0' cellpadding='3' cellspacing='1' bgcolor='#5AAE18'>");
        if (tlist.Count != 0)
        {
            this.Response.Write("<tr bgcolor='#FFFFFF'><td><strong>主题</strong></td><td><strong>日程日期</strong></td><td><strong>类型</strong></td><td><strong>发送人</strong></td><td><strong>时间</strong></td></tr>");
            foreach (timeorder d in tlist)
            {
                this.Response.Write("<tr bgcolor='#FFFFFF'><td><a href='rc_notecontent.aspx?tid=" + d.to_id+ "'>" + d.to_title + "</a></td><td>" + d.to_orderdate + "</td><td>工作日程</td>" + "</td><td>" + d.users.u_username+ "</td>" + "</td><td>" + d.to_sendtime + "</td>");
                this.Response.Write("");
            }

        }
        else
        {
            this.Response.Write("<tr><td colspan='5' align='left'><span class='style1'>对不起，没有你要查找的数据！！</span></td></tr>");
        }
        this.Response.Write("</table>");
    }
}
